
mod tests{
    use tokio::runtime::Builder;
    use rust_my_tools::dao::sqlserver::sql_server_dao;

    fn cre_runtime() -> tokio::runtime::Runtime {
        // 创建一个 Tokio 运行时，配置线程池的大小
        Builder::new_multi_thread()
            .worker_threads(1) // 设置工作线程的数量
            .max_blocking_threads(16) // 设置阻塞任务的最大线程数
            .enable_all()
            .build()
            .unwrap()
    }
    #[test]
    pub fn test_demo(){
        let r = cre_runtime();

        r.block_on(async move {
            sql_server_dao::demo().await.unwrap();
        });
    }

    #[test]
    pub fn test_query(){
        let r = cre_runtime();

        r.block_on(async move {
            let mut client = sql_server_dao::get_client( "192.168.6.199",
                                        1433,
                                        "suoyinshuju",
                                        "sa",
            "Yiscn123456@").await.unwrap();

            let sql = "SELECT  TOP 20 * FROM dbo.ES order by xxzx_id asc";
            let r = sql_server_dao::select_list(&sql, &mut client).await.unwrap();
            println!("{:?}", r.0);
            for row in r.1.iter() {
                println!("==============================================================================");
                for cell in row.iter() {
                    println!("{}", cell);
                }
            }
        });
    }
}